package org.wannatrak.android.executions;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import org.wannatrak.android.ApplicationContext;
import org.wannatrak.android.exceptions.HttpException;

/**
 * @Author: Maksim Tulupov maxtulupov@gmail.com
 * @Date: $Date: 2011-06-15 10:29:43 +0000 (Wed, 15 Jun 2011) $
 * @Time: 22:32:59
 * @Version: $Revision: 4 $
 * @Id: $Id: ProjectBroadcastReceiver.java 4 2011-06-15 10:29:43Z maxtulupov@gmail.com $
 */
public class ProjectBroadcastReceiver extends BroadcastReceiver {

    public void onReceive(Context context, Intent intent) {
        Log.e(getClass().getSimpleName(), "start broadcast receiver");
        try {
            ApplicationContext.getWannatrakService().sendTracks();
        } catch (Exception e) {
            Log.e(getClass().getSimpleName(), "error sending tracks", e);
        }
    }
}
